var map;
var rendererOptions = {
  draggable: true
};
var directionsDisplay;

function createMap(lat, lng, domID, getTraffic) {
	directionsDisplay = new google.maps.DirectionsRenderer(rendererOptions);
	var warehouse = new google.maps.LatLng(lat, lng);
	var myOptions = {
		zoom :12,
		center :warehouse,
		mapTypeId :google.maps.MapTypeId.ROADMAP
	};

	map = new google.maps.Map(document.getElementById(domID),
			myOptions);
	
	directionsDisplay.setMap(map);
	
	if(getTraffic){
		var trafficLayer = new google.maps.TrafficLayer();
		trafficLayer.setMap(map);
	}
}
